import { lazy } from 'react';
import LazyLoad from '../../components/LazyLoad';
import LayoutCesium from '../../layout/LayoutCesium';
import { RouteItem } from '../Type';

const routers: Array<RouteItem> = [
    {
        meta: {
            key: 'cesium',
            title: 'Cesium示例',
        },
        element: <LayoutCesium />,
        children: [
            {
                meta: {
                    key: 'scene',
                    title: '场景示例',
                },
                children: [
                    {
                        path: '/skyBox',
                        element: LazyLoad(lazy(() => import('../../view/cesium/scene/skyBox'))),
                        meta: {
                            requiresAuth: true,
                            title: '星空盒',
                            key: 'skyBox',
                        },
                    },
                    {
                        path: '/atmosphere',
                        element: LazyLoad(lazy(() => import('../../view/cesium/scene/atmosphere'))),
                        meta: {
                            requiresAuth: true,
                            title: '大气层',
                            key: 'atmosphere',
                        },
                    },
                    {
                        path: '/weather',
                        element: LazyLoad(lazy(() => import('../../view/cesium/scene/weather'))),
                        meta: {
                            requiresAuth: true,
                            title: '天气',
                            key: 'weather',
                        },
                    },
                    {
                        path: '/map',
                        element: LazyLoad(lazy(() => import('../../view/cesium/scene/map'))),
                        meta: {
                            requiresAuth: true,
                            title: '地图',
                            key: 'map',
                        },
                    },
                    {
                        path: '/terrain',
                        element: LazyLoad(lazy(() => import('../../view/cesium/scene/terrain'))),
                        meta: {
                            requiresAuth: true,
                            title: '地形',
                            key: 'terrain',
                        },
                    },
                    {
                        path: '/screenshot',
                        element: LazyLoad(lazy(() => import('../../view/cesium/scene/screenshot'))),
                        meta: {
                            requiresAuth: true,
                            title: '场景截图',
                            key: 'screenshot',
                        },
                    },
                    {
                        path: '/background',
                        element: LazyLoad(lazy(() => import('../../view/cesium/scene/background'))),
                        meta: {
                            requiresAuth: true,
                            title: '地图背景',
                            key: 'background',
                        },
                    },
                ],
            },
        ],
    },
];

export default routers;
